home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / gdb-3.98 / gdb / xm-pn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-01  |  2.7 KB  |  83 lines

  1. /* Parameters for execution on a Gould PN, for GDB, the GNU debugger.
  2.    Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
  3.  
  4. This file is part of GDB.
  5.  
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #define HOST_BYTE_ORDER BIG_ENDIAN
  21.  
  22. /* Get rid of any system-imposed stack limit if possible.  */
  23. #define SET_STACK_LIMIT_HUGE
  24.  
  25. #define MISSING_VPRINTF
  26.  
  27. /* Address of U in kernel space */
  28. #define    KERNEL_U_ADDR        0x3fc000
  29.  
  30. /*
  31.  * No KDB support, Yet! */
  32. /* Interface definitions for kernel debugger KDB.  */
  33.  
  34. /* Map machine fault codes into signal numbers.
  35.    First subtract 0, divide by 4, then index in a table.
  36.    Faults for which the entry in this table is 0
  37.    are not handled by KDB; the program's own trap handler
  38.    gets to handle then.  */
  39.  
  40. #define FAULT_CODE_ORIGIN 0
  41. #define FAULT_CODE_UNITS 4
  42. #define FAULT_TABLE    \
  43. { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
  44.   0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
  45.   0, 0, 0, 0, 0, 0, 0, 0, \
  46.   SIGILL }
  47.  
  48. /* Start running with a stack stretching from BEG to END.
  49.    BEG and END should be symbols meaningful to the assembler.
  50.    This is used only for kdb.  */
  51.  
  52. #define INIT_STACK(beg, end)  \
  53. { asm (".globl end");         \
  54.   asm ("movel $ end, sp");      \
  55.   asm ("clrl fp"); }
  56.  
  57. /* Push the frame pointer register on the stack.  */
  58. #define PUSH_FRAME_PTR        \
  59.   asm ("movel fp, -(sp)");
  60.  
  61. /* Copy the top-of-stack to the frame pointer register.  */
  62. #define POP_FRAME_PTR  \
  63.   asm ("movl (sp), fp");
  64.  
  65. /* After KDB is entered by a fault, push all registers
  66.    that GDB thinks about (all NUM_REGS of them),
  67.    so that they appear in order of ascending GDB register number.
  68.    The fault code will be on the stack beyond the last register.  */
  69.  
  70. #define PUSH_REGISTERS        \
  71. { asm ("clrw -(sp)");          \
  72.   asm ("pea 10(sp)");          \
  73.   asm ("movem $ 0xfffe,-(sp)"); }
  74.  
  75. /* Assuming the registers (including processor status) have been
  76.    pushed on the stack in order of ascending GDB register number,
  77.    restore them and return to the address in the saved PC register.  */
  78.  
  79. #define POP_REGISTERS          \
  80. { asm ("subil $8,28(sp)");     \
  81.   asm ("movem (sp),$ 0xffff"); \
  82.   asm ("rte"); }
  83.